package edu.sctu.wujiayi.month06.day20150614.FilePractice;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;

/**
 * Created by user11 on 2015/6/14.
 */
public class FileReaderOne {


    public static void main(String[] args) throws FileNotFoundException {
        int i = 0;
        int j = 0;
        try {
            FileReader reader = new FileReader(new File("D://nath//sherlock1.txt"));

            char ch[] = new char[1024];

            byte m[] = new byte[1024];

            try{

                while ((i = reader.read(ch)) != -1){
                    System.out.println(new String(ch));

//                    try {
//                        for (int k = 0;k<ch.length; k++) {
//
//                            m[k] = (byte) ch[k];
//                            System.out.println(m[k]);
//                        }
//                    }catch (Exception e){
//                        System.out.println("xuexuejiang");
//                    }
//


                }








            }catch (Exception e){
                e.printStackTrace();
            }

        }catch (Exception e){
            e.printStackTrace();
        }

    }
}
